package com.example.demo.controller;

import com.example.demo.entity.Image;
import com.example.demo.mapper.ImageMapper;
import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getImage")
public class ImageController {

    @Resource
    ImageMapper imageMapper;

    @GetMapping("/getSwiper")
    public List<Image> getImage(){
        return imageMapper.findAll();
    }
}
